//
//  ZYPopLayerRequest.h
//  DesignMode
//
//  Created by wangzhipan on 2024/11/15.
//

#import <Foundation/Foundation.h>
#import "IPopLayerProtocol.h"

/*
 命令模式：将行为的“请求者” 与 行为的 “实现者”解耦，通过解耦我们可以对“请求”就行优先级排队、记录日志、撤销等操作
 */

@interface ZYPopLayerRequest : NSObject <IPopLayerRequest>
@property (nonatomic, copy, nullable) PopLayerShowCmd showBlock;
@property (nonatomic, copy, nullable) PopLayerCloseCmd closeBlock;

@property (nonatomic, copy, nullable) PopLayerInterruptCmd interruptBlock;
@property (nonatomic, copy, nullable) PopLayerResumeCmd resumeBlock;

@property (nonatomic, copy, nullable) NSString *popLayerId;
@property (nonatomic, assign) BOOL isManual;  //是否用户手动点击
@property (nonatomic, assign) NSUInteger priority;
@property (nonatomic, copy, nullable) void(^finishBlock)(void);

- (nonnull instancetype)initWithPopLayerId:(nonnull NSString *)popLayerId
                                  isManual:(BOOL)isManual
                                 showBlock:(nonnull PopLayerShowCmd)showBlock
                                closeBlock:(nonnull PopLayerCloseCmd)closeBlock
                            interruptBlock:(nullable PopLayerInterruptCmd)interruptBlock
                                 resumeCmd:(nullable PopLayerResumeCmd)resumeBlock;

@end
